<template>
  <div id="login">
    <div class="cc11">
      <div id="logi">
        <div style="margin-top: 20px;">
          <h1>物业登录</h1>
        </div>
        <div id="user">
          <el-input prefix-icon="el-icon-user-solid" placeholder="请输入账号" v-model="form.certifiedAccountAccount"
            clearable>
          </el-input>
        </div>
        <div id="pwd">
          <el-input placeholder="请输入密码" prefix-icon="el-icon-s-tools" v-model="form.certifiedAccountPass" show-password>
          </el-input>
        </div>
        <div id="submit">
          <el-button type="primary" size="medium"
            :disabled="!(form.certifiedAccountAccount!==''&&form.certifiedAccountPass!=='')"
            @click="login">点击登录</el-button>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        form: {
          certifiedAccountAccount: "",
          certifiedAccountPass: ""
        }
      }
    },
    methods: {
      login() {
        this.$http.post("/certified/certifiedAccount/login", this.form).then(resp => {
          if (resp.data.code == 200) {
            this.$router.push("/ParkingMenu")
          }
          alert(resp.data.message)
        })
      }
    },
    created() {}
  }
</script>

<style>
  #login {
    width: 100%;
    height: 100%;
  }

  .cc11 {
    width: 100%;
    height: 100%;
    background-image: url(../../static/image/R-C.jpg);
    background-repeat: no-repeat;
    background-size: cover;
  }

  #logi {
    background-color: rgba(120, 110, 100, 0.9);
    /*设置背景颜色透明度*/
    border-radius: 15px 15px 15px 15px;
    /* 设置盒子圆角*/
    text-align: center;
    /*水平方向居中*/
    border-top: 1px solid white;
    margin-left: 70%;
    margin-top: 10%;
    height: 400px;
    width: 300px;
    position: absolute;
    /*  background-color: white;
    border: 0.0625rem solid red; */
    background-color: rgba(255, 255, 255, 0.93);
  }

  #user {
    margin-top: 50px;
    margin-left: 30px;
    width: 240px;
  }

  #pwd {
    margin-top: 50px;
    margin-left: 30px;
    width: 240px;
  }

  #submit {
    text-align: center;
    /*水平方向居中*/
    margin-top: 30px;
  }

  #register {
    text-align: center;
    /*水平方向居中*/
    margin-top: 30px;
  }
</style>
